home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
sound
/
players
/
digistuf.arc
/
BEEP
/
BEEP.DOC
next >
Wrap
Text File
|
1992-08-20
|
6KB
|
191 lines
Beep
Copyright (C) 1991, 1992
By David Baggett
--------------------------------------------------------------------------------
User Contract
This program is FREE. You may distribute it at will, provided you
1) do not charge any money for it,
2) distribute it WITH the documentation, and
3) do not change the program or documentation in ANY WAY.
--------------------------------------------------------------------------------
Introduction
------------
In 1989 Dan Wilga released a Public Domain program called "newbell"
that replaced the boring "ding" sound the ST makes with a digitized
sound. Unfortunately, newbell only allowed certain playback speeds, all of
which were incompatible with sounds sampled on the Mac.
Here's a new program that does the same thing, but allows sample playback
speed to be specified in Hertz. It also lets you use stereo and signed
samples, and supports the STe's enchanced DMA sound capabilities.
General Usage
-------------
Put beep.prg in your AUTO folder and create beep.inf with a standard
ASCII text editor. In beep.inf, put the name of the sample you want to
replace the system beep with and the playback speed in Hertz for the sample.
For example,
c:\sounds\lowchime.snd 8000
will replace the system beep with a chime sample, played at 8000 Hertz.
Enabling and Disabling Beep
---------------------------
When beep.prg is invoked with no parameters, it reads the beep.inf
file and loads all the sounds. This typically occurs at bootup in the
AUTO folder. However, you can run beep.prg from a command shell (or
from the desktop if you rename a copy beep.ttp) as well. To turn
Beep off, type
beep off
from a command shell, or run beep.ttp from the desktop with parameter
"off".
Similary, type
beep on
to turn Beep back on.
Specifying an Alternate D/A Device
----------------------------------
Beep can be configured to play its samples through other D/A devices.
Currently, the Hippo/Navarone and ST Replay digitizers are supported. The
STe's (and TT's, and Falcon's) 8-bit D/A is also supported, with either the
DMA or the MFP for timing. (If you use the DMA for timing, you can only play
at certain sample rates, so sounds may sound too fast or slow. On the other
hand, if you use the MFP for timing you can play stereo samples at any rate
but the sound quality isn't quite as good.)
Other digitizers will be supported if people send me info on them.
To use an alternate D/A device, put one of the following keywords
in curly brackets somewhere in your beep.inf file:
hippo replay dma mfp
For example, a beep.inf containing
{dma}
d:\usr\sounds\zoinks.snd 8000
will cause Beep to play the "zoinks" sound through the DMA sound device, using
the DMA for timing. (This won't work on machines that don't have DMA sound
capabilities, of course.)
Note that the normal ST system beep will still be masked, even if
you don't use the speaker as the D/A device.
Different Kinds of Samples
--------------------------
Unless you tell it otherwise, Beep assumes your sounds are unsigned 8-bit
mono samples. You can use stereo and/or unsigned samples with Beep too, by
putting one of the following keywords in brackets after the filename:
stereo signed
For example, a beep.inf containing
d:\usr\sounds\type2.snd {stereo} 8000
will make Beep interpret beep2.snd as stero data instead of mono. (Stereo
sounds will play on mono devices; the channels are just mixed together.)
Similarly the directive
d:\usr\sounds\beep2.snd {signed} 8000
tells Beep that beep2.snd has signed 8-bit samples instead of unsigned
samples. Some digitizing software saves sounds in this format instead of
the usual unsigned format. If you're not sure what you've got, a general
rule of thumb is that if a sound sounds very noisy you should try it as
signed.
Technical Information
---------------------
Beep steals Bios trap #13 and looks for Bconout(2, 7) calls. When it sees
one, it plays the sound.
The program uses about 30K when resident, not including the space
taken up by the sample data. (Down from 38K in version 1.0)
In earlier versions, Beep used bit 6 of the CONTERM global to enable
and disable itself. Unfortunately, this conflicted with at least one
person's hard disk driver. (Don't ask me why.)
This version uses the bit 6 of memory location 768, chosen arbitrarily
from the list of user interrupt vectors. If for some reason Beep will not
run with a particular application resident, try moving the on/off flag
somewhere else in memory. To do this, put the desired flag address in angle
brackets at the beginning or end of your beep.inf file; e.g.,
<1020>
d:\usr\sounds\zoinks.snd 8000
will cause Beep to use 1020 (decimal) as the memory location for the beep
on/off flag. To then enable and disable Beep, pass the address as a third
parameter to the beep [on | off] call; e.g.,
beep off 1020
will mask bit 6 of the byte at location 1020 decimal, thereby disabling Beep.
Memory locations 512 through 1020 are good candidates for flag locations
since they are currently not claimed by Atari.
Whenever Beep is on it masks the normal system beep by clearing the
appropriate bit in CONTERM.
Beep is well-behaved and should work with all versions of TOS. It does
not use any undocumented techniques or memory locations,except of course for
the beep on/off flag, which can be moved elsewhere in memory if necessary.
Caveats
-------
It's best to play samples at fairly low rates (e.g., 8000 or 11000 Hertz)
so that you don't completely bog down the system. Using samples at rates
above 11000 will often prevent the mouse from tracking correctly while the
sound is playing, and may cause weird things to happen to very CPU-intensive
applications. (To see this effect, select the "About..." box in TOS 1.4 and
click outside the dialog box with Beep on.)
The program will not know it has already been installed if you
run it twice (or ten times) in a row. Doing so will use up more and
more memory.